<template>
	<view class="body">
		<xk-header :headerbg="true" :back="true" title="公司邀请码"></xk-header>
		<view class="info">{{inviteCode}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inviteCode: ""
			};
		},
		onLoad(options) {
			this.initInfo()
		},
		methods:{
			initInfo() {
				let query = this.$util.formatGraphqlQuery([{
					fun: "inviteCode:register_getInvitationCode"
				}])
				this.$util.postGraphql({query}, {
					isLoading: true
				}).then((res)=>{
					console.warn("我的邀请码：", res)
					this.inviteCode = res.inviteCode
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.info {
	display: flex;
	margin: 20rpx;
	background-color: #FFFFFF;
	height: 300rpx;
	align-items: center;
	justify-content: center;
	font-size: 80rpx;
	font-weight: bold;
}
</style>
